import ble from '@ohos.bluetooth.ble'
import Log from '../utils/Logger';

const TAG = "BleHelper"

export class BleHelper {

  static startBLEScan(filters: Array<ble.ScanFilter> = null, options?: ble.ScanOptions): boolean {
    try {
      ble.startBLEScan(filters, options)
      Log.info(TAG, 'startBLEScan success')
      return true
    } catch (err) {
      Log.error(TAG, 'startBLEScan fail', JSON.stringify(err) ?? '')
      return false
    }
  }
}

